
	<div class="adminrectangle"><h2><?php echo $title; ?></h2></div>
	<div class="grid_12"><h5>Below is a list of the users.</h5></div>
  	<p><a href="<?php echo site_url('admin/create_user');?>" class="button add"><span class="icon icon13"></span><span class="label"><?php echo lang('create_new_user');?></span></a></p>
	<?php if ($message != "")
  {
  ?>
  <div id="infoMessage" title="<?php echo $message; ?>"><?php echo $message;?></div>
	<?php } ?>
  <div class="grid_12 alpha omega">
  	<table class="stripeMe" style="width:100%;">
  		<tr>
        <th>Username</th>
  			<th>First Name</th>
  			<th>Last Name</th>
  			<th>Email</th>
  			<th>Groups</th>
  			<th>Status</th>
			  <th>Quick Links</th>
  		</tr>
  		<?php foreach ($users as $user):?>
  			<tr>
  				<td><?php echo $user->username;?></td>
  				<td><?php echo $user->first_name;?></td>
  				<td><?php echo $user->last_name;?></td>
  				<td><?php echo $user->email;?></td>
  				<td>
  					<?php foreach ($user->groups as $group):?>
  						<?php echo $group->name;?><br />
  	                <?php endforeach?>
  				</td>
  				<td><?php echo ($user->active) ? 'Active' : 'Inactive';?></td>
				<td>
					<?php echo ($user->active) ? anchor("admin/deactivate_user/".$user->id, '<span class="icon icon25">&nbsp;</span>', "title='Deactivate Account' class='button left negative'") : anchor("admin/activate_user/". $user->id, '<span class="icon icon26">&nbsp;</span>', "title='Activate Account' class='button left positive'");?>
					
          <?php
            if (!$user->payed)
            {
              echo anchor('admin/user_payed/'.$user->id,'<span class="icon icon81">&nbsp;</span>', "title='Payed' class='button middle positive'");
            }
            else
            {
              echo anchor('admin/user_unpayed/'.$user->id,'<span class="icon icon81">&nbsp;</span>', "title='Not Payed' class='button middle negative'");
            }
          ?>
          <?php echo anchor("admin/delete_user/".$user->id,"<span class='icon icon9'></span>","class='button right negative' title='Delete User'"); ?>
					
				</td>
  			</tr>
  		<?php endforeach;?>
  	</table>
  </div>  

